/*
*	create by  jack ,20211109
*
*	描述 ：
*		  该文件提供了一套设备调用的接口，屏蔽具体实现细节,以达到应用程序可以在不同的平台上联合调试。
*		  open 返回该设备枚举类别。无设备实现时，返回负数.
*   修改记录：[内容][作者][时间]
*
*/


#ifndef _SANJI_OS_LCD_H_
#define _SANJI_OS_LCD_H_

#include "define_comm.h"
#include "device.h"
#include "gpio.h"

#ifdef __cplusplus
extern "C"{
#endif

#define LCD_GET_BUF_INFO 1
#define LCD_CLEAN_BUFFER 2
#define LCD_CLEAN_SCREEN_BUFFER 3

struct lcd_framebuffer
{
    sj_char *buffer;
    sj_int8 width;
    sj_int8 height;
};

struct lcd_device_data
{
    struct rcc_apb_periph *rcc_apb;
    struct gpio_pin res; //RST
    struct gpio_pin cs;
    struct gpio_pin scl;
    struct gpio_pin sda;
    struct gpio_pin cmd; //RS
    struct gpio_pin pwr;
    struct gpio_pin blight;
    struct lcd_framebuffer fb;
};


#ifdef __cplusplus
}
#endif
#endif
